package com.exam.FaceLogin.controller;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.exam.FaceLogin.bean.FaceVefLog;
import com.exam.FaceLogin.bean.result.FaceResult;
import com.exam.FaceLogin.service.FaceService;
import com.exam.FaceLogin.service.FaceVefLogService;
import com.exam.entity.ApiResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author tanyongpeng
 * <p>des</p>
 **/
@RestController
@RequestMapping("/face/log")
@Slf4j
public class FaceVefLogController {

    @Autowired
    private FaceService faceService;

    /**
     * 查询所有验证人脸日志信息
     * @param current
     * @param size
     * @param startTime
     * @param endTime
     * @param vefCode
     * @param loginName
     * @return
     */
    @GetMapping("/list")
    public ApiResult faceList(@RequestParam Integer current, @RequestParam Integer size,
            @RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime,
            @RequestParam(required = false) String vefCode, @RequestParam(required = false) String loginName){

        return faceService.faceLogList(current, size, startTime, endTime, vefCode, loginName);

    }

}
